﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NineMine.DataModel
{
    public class Repository
    {
        [Key]
        public long Id { get; set; }

        [Required]
        public Project Project { get; set; }

        [MaxLength(255)]
        public string Url { get; set; }

        [MaxLength(60)]
        public string Login { get; set; }

        [MaxLength(255)]
        public string Password { get; set; }

        [MaxLength(255)]
        public string RootUrl { get; set; }

        [MaxLength(255)]
        public string RepositoryType { get; set; }

        [MaxLength(64)]
        public string PathEncoding { get; set; }

        [MaxLength(64)]
        public string LogEncoding { get; set; }

        [Column(TypeName = "ntext")]
        public string ExtraInfo { get; set; }

        [MaxLength(255)]
        public string Identifier { get; set; }

        public bool IsDefault { get; set; }

        public List<ChangeSet> ChangeSets { get; set; }
    }
}
